/**
 * Project: push-center-biz-core
 * 
 * File Created at 2014年10月9日
 * 
 * Copyright 2012 Greenline.com Corporation Limited.
 * All rights reserved.
 *
 * This software is the confidential and proprietary information of
 * Greenline Company. ("Confidential Information").  You shall not
 * disclose such Confidential Information and shall use it only in
 * accordance with the terms of the license agreement you entered into
 * with Greenline.com.
 */
package com.greenline.push.core.pushcenter.impl;

import java.util.List;

import javax.annotation.Resource;

import com.greenline.push.core.pushcenter.TaskSyncManager;
import com.greenline.push.dal.pushcenter.TaskSyncDAO;
import com.greenline.push.dal.pushcenter.dataobject.TaskSyncDO;
import com.greenline.push.dal.query.TaskSyncQuery;

/**
 * @Type TaskSyncManagerImpl
 * @Desc
 * @author shuai.zuo
 * @date 2014年10月9日
 * @Version V1.0
 */
public class TaskSyncManagerImpl implements TaskSyncManager {
    @Resource
    private TaskSyncDAO taskSyncDAO;

    /*
     * (non-Javadoc)
     * 
     * @see
     * com.greenline.push.core.pushcenter.AppChannelManager#insert(com.greenline
     * .push.dal.pushcenter.dataobject.AppChannelDO)
     */
    @Override
    public Long insert(TaskSyncDO taskSyncDO) {
        return taskSyncDAO.insert(taskSyncDO);
    }

    /*
     * (non-Javadoc)
     * 
     * @see
     * com.greenline.push.core.pushcenter.AppChannelManager#getAppChannelById
     * (java.lang.Long)
     */
    @Override
    public TaskSyncDO getById(Long id) {
        return taskSyncDAO.getById(id);
    }

    /*
     * (non-Javadoc)
     * 
     * @see
     * com.greenline.push.core.pushcenter.AppChannelManager#update(com.greenline
     * .push.dal.pushcenter.dataobject.AppChannelDO)
     */
    @Override
    public boolean update(TaskSyncDO taskSyncDO) {
        return taskSyncDAO.update(taskSyncDO) > 0;
    }

    /*
     * (non-Javadoc)
     * 
     * @see
     * com.greenline.push.core.pushcenter.AppChannelManager#listByQuery(com.
     * greenline.push.dal.query.AppChannelQuery)
     */
    @Override
    public TaskSyncQuery listByQuery(TaskSyncQuery query) {
        return taskSyncDAO.listByQuery(query);
    }

    /*
     * (non-Javadoc)
     * 
     * @see
     * com.greenline.push.core.pushcenter.AppChannelManager#listByQuery(java
     * .lang.Long)
     */
    @Override
    public boolean delete(Long id) {
        return taskSyncDAO.delete(id) > 0;
    }

    @Override
    public List<TaskSyncDO> listByExample(TaskSyncDO taskSyncDO) {
        return taskSyncDAO.listByExample(taskSyncDO);
    }

    @Override
    public TaskSyncDO getTaskSyncByType(int type) {
        return taskSyncDAO.getTaskSyncByType(type);
    }

}
